<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .child{
            height:50px;
            width:100%;
            background-color:red;
            padding:10px;
            margin:10px;
            border:5px dashed yellow;
        }

        .parent{
            background-color:black;
            height:200px;
            width:400px;
        }
        .a {
            width: 980px;
            background-color: #cccccc;
            height: 300px;
        }
        p {
            width: 100%;
            /*width: auto;*/
            padding: 10px;
            background-color: #000000;
        }
    </style>
</head>
<body>
<div class="parent">
    <div class="child">
        <span>123456789ffffffffddddddddddddddddddddff</span>
    </div>
</div>
<div class="a">
    <p>1111</p>
</div>
</body>
</html>